package com.hqd.ch03.v50.beans.factory.config;

import com.hqd.ch03.v50.beans.BeansException;
import com.hqd.ch03.v50.beans.factory.NoSuchBeanDefinitionException;
import com.hqd.ch03.v50.factory.ConfigurableBeanFactory;
import com.hqd.ch03.v50.factory.ListableBeanFactory;

import java.util.Iterator;

public interface ConfigurableListableBeanFactory
        extends ListableBeanFactory, AutowireCapableBeanFactory, ConfigurableBeanFactory {
    /**
     * 忽略指定类型
     */
    void ignoreDependencyType(Class<?> type);

    /**
     * 清除缓存
     */
    void clearMetadataCache();

    /**
     * 冻结配置，冻结后不能修改
     */
    void freezeConfiguration();

    void ignoreDependencyInterface(Class<?> ifc);

    void registerResolvableDependency(Class<?> dependencyType, Object autowiredValue);

    boolean isAutowireCandidate(String beanName, DependencyDescriptor descriptor)
            throws NoSuchBeanDefinitionException;

    BeanDefinition getBeanDefinition(String beanName) throws NoSuchBeanDefinitionException;

    Iterator<String> getBeanNamesIterator();

    boolean isConfigurationFrozen();

    void preInstantiateSingletons() throws BeansException;

}
